
-- base64
local text = "hello world";
local encoded = commonlib.Base64Encode(text);
print(encoded);
print(commonlib.Base64Decode(encoded));

-- jwt
local token = commonlib.JwtEncode({key = 1}, "xiaoyao");
print("token:", token);
commonlib.echo(commonlib.JwtDecode(token, "xiaoyao"));